package util;

import java.util.Calendar;
import java.util.Date;

/**
 * Created by root on 17-6-16.
 */

public class WeekOfDay {
    public static int dayForWeek(Date pTime) {
        Calendar c = Calendar.getInstance();
        c.setTime(pTime);

        int p = c.get(Calendar.DAY_OF_WEEK) - 1;
//        if (p < 0) {
//            p = 6;
//        }
        return p;
    }
}
